home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13086 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  952 b 

  1. Path: ix.netcom.com!news
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Advanced C++ question...
  5. Date: Sat, 23 Mar 1996 13:41:27 GMT
  6. Organization: Netcom
  7. Message-ID: <3153ff33.260214839@nntp.ix.netcom.com>
  8. References: <4iprfg$1ui@aadt> <4iv31k$ch7@transformer.pti-us.com>
  9. NNTP-Posting-Host: ix-dc9-01.ix.netcom.com
  10. X-NETCOM-Date: Sat Mar 23  7:41:39 AM CST 1996
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. Walt Dixon <wv.dixon@pti-us.com> wrote:
  14.  
  15. > You might try something like this
  16. > object& operator*(int);
  17. > object& operator*(int) const;
  18. > the first being the lvalue operator, the second
  19. > being the rvalue operator
  20.  
  21. Why should he try something that won't work?  
  22.  
  23. The decision as to whether to use the const or nonconst version is
  24. based only on whether the object for which it is called is const or
  25. not.  It has nothing to do with whether the result is being used as an
  26. lvalue or rvalue.
  27.  
  28. Michael M Rubenstein
  29.